<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="rate/ratingfiles/ratings.css" rel="stylesheet" type="text/css" />
<script src="rate/ratingfiles/ratings.js" type="text/javascript"></script>
<title>Untitled Document</title>
</head>

<body>
<p>
</p>
<div class="items">
	<div class="container">
		<div class="row">
        <div class="span3 hidden-phone">

				<h5 class="title">Danh mục sản phẩm</h5>

				<!-- Sidebar navigation -->
				<nav>
					<ul id="nav">
						<?php
						createListCategory();
						?>
                        <?php
						$id=$_REQUEST["id"];
						$hostname_connect = "localhost";
						$database_connect = "Advertisement";
						$username_connect = "root";
						$password_connect = "";	
						$connect = mysql_pconnect($hostname_connect, $username_connect, $password_connect) or trigger_error(mysql_error(),E_USER_ERROR);
						mysql_query("set names 'utf8'");
						mysql_select_db($database_connect, $connect);
						$query_detaile = "SELECT `Address`, `EStoreID`, `Phone`, `Logo`,`CompanyName`, `Banner`,`YahooID`,`WarantyDescription`,`FavouriteSite1`,`estore`.`Visited` FROM `estore`,`euser` WHERE `euser`.`EUserID`=`estore`.`EStoreID` and `EStoreID`=$id";
						$estore = mysql_query($query_detaile, $connect) or die(mysql_error());
						while ($rowestore = mysql_fetch_array($estore)) {?>
					</ul>
				</nav>
				<br>
				
				<h5 class="title">Website Yêu Thích</h5>				
  			<tr>
    			<td><?php echo $rowestore['FavouriteSite1']; ?></td>
                <div class="srtgs" id="rt_<?php echo $rowestore['EStoreID']; ?>"></div>
     			
  			</tr>
  			
				<br><br>
				
				<h5 class="title">Hỗ trợ bán hàng</h5>				
  			<tr>
    			<td><a href="ymsgr:SendIM?<?php echo $rowestore['YahooID']; ?>" taget="_blank"><img src=http://opi.yahoo.com/online?u=<?php echo $rowestore['YahooID']; ?>&m=g&t=19 border=0></a></td>     			
  			</tr>
              			
				
			</div>
			
		
			
        <div class="span9">
				<div class="row">
<table width="700" border="1" cellspacing="1" cellpadding="1">
<tr>
    <td rowspan="4" width="200" height="200"><center><img width="200" height="200" src="<?php echo $rowestore['Logo']; ?>" /></center>
    </td>
    <td colspan="2">Công ty: <b><?php echo $rowestore['CompanyName']; ?></b> </td>
    </tr>
<tr>
  <td colspan="2">Phone: <?php echo $rowestore['Phone']; ?></td>
</tr>
<tr>
    <td colspan="2">Địa chỉ: <?php echo $rowestore['Address']; ?>
    </td>
</tr>

<tr>
    <td>Yahoo ID: <?php echo $rowestore['YahooID']; ?>
    </td>
    <td colspan="2">Lượt xem: <?php echo $rowestore['Visited']; ?>
    </td>
</tr>
  <tr>
  <td colspan="3" bgcolor="#009900"><h2><font color="white">Các sản phẩm</font></h2><br /></td>
  </tr>
<?php
}
?>
  <caption>
    <h2>THÔNG TIN ESTORE</h2>
  </caption>
<?php
$id=$_REQUEST["id"];
mysql_select_db($database_connect, $connect);
$query_detail = "SELECT `product`.`ProductID`, `subcategory`.`SubCategoryName`, `product`.`ProductName`, `product`.`Manufacturer`, `product`.`Image`, `product`.`Price`, `product`.`CreatedDate`, `product`.`Information`, `product`.`Waranty`, `product`.`SubCategoryID` ,`product`.`EUserID`FROM `product`,`subcategory` WHERE `product`.`SubCategoryID` = `subcategory`.`SubCategoryID` and `product`.`EUserID`=$id";
$detail = mysql_query($query_detail, $connect) or die(mysql_error());
$row_detail = mysql_fetch_assoc($detail);
$totalRows_detail = mysql_num_rows($detail);
?>
  <?php
        if (isset($row_detail) && is_array($row_detail)) {
          do { //Nested repeat
?>
<tr>
    <td rowspan="6" scope="col" align="center" width="300" height="300"><img width="200" height="200" src="<?php echo $row_detail['Image'];?>" alt=""></td>
    <td colspan="2" scope="col">Tên sản phẩm: <?php echo $row_detail['ProductName']; ?></td>
  </tr>
  <tr>
    <td colspan="2">Thông tin: <?php echo $row_detail['Information']; ?></td>
  </tr>
  <tr>
    <td colspan="2"><?php echo $row_detail['Manufacturer']; ?></td>
  </tr>
  <tr>
    <td colspan="2">Bảo hành: <?php echo $row_detail['Waranty']; ?></td>
  </tr>
  <tr>
    <td colspan="2">Danh mục: <?php echo $row_detail['SubCategoryName']; ?></td>
  </tr>
  <tr>
    <td width="200">Ngày Tạo: <?php echo $row_detail['CreatedDate']; ?></td>
    <td>Giá:<?php echo $row_detail['Price'];?></td>
  </tr>
<?php
		}
		  while ($row_detail = mysql_fetch_assoc($detail));
		}
?>
<tr>
    <td colspan="3">Banner
    </td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp; </p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>